package updater;

import gamehandlers.GameHandler;
import java.awt.Dimension;
import java.util.ArrayList;

import sprite.Sprite;




/**
 * Updates Sprites.
 * 
 * @author Seon Kang
 */

public class SpriteUpdater implements Updater {
    private ArrayList<Sprite> mySpriteList = new ArrayList<Sprite>();
    private GameHandler myGameHandler;

    /**
     * 
     * @param spritelist
     */
    public SpriteUpdater (ArrayList<Sprite> spritelist, GameHandler gameHander) {
        setSpriteList(spritelist);
        myGameHandler = gameHander;
    }

    @Override
    public void update () {
        for (Sprite s : mySpriteList) {
            s.update();
        }
    }



    protected void setSpriteList (ArrayList<Sprite> spritelist) {
        mySpriteList = spritelist;
    }

    /**
     * 
     * 
     * @return
     */
    public ArrayList<Sprite> getSpriteList () {
        return mySpriteList;
    }
}
